#!/usr/bin/env bash
#
# Copyright (c) Guangdong Big Banian Info Tech Co., Ltd. All rights reserved.
# 停止一个软件包的相关进程, 要卸载软件包的相关文件前执行.T.
#

prefix=@prefix@
pkg_name=@PACKAGE_NAME@

# To stop services
if [ -x /etc/init.d/${pkg_name} ]; then
    /etc/init.d/${pkg_name} stop
fi

# Delete startup link
update-rc.d -f ${pkg_name} remove

# Delete work dir
# if [ -d ${prefix}/${pkg_name} ]; then
#     rm -r ${prefix}/${pkg_name}
# fi

exit 0
